package com.questionnaire.service.impl;

import com.questionnaire.dao.PaperDao;
import com.questionnaire.pojo.Paper;
import com.questionnaire.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PaperServiceImpl implements PaperService {

    @Autowired
    private PaperDao paperDao;

    @Override
    public Paper findOneByPk(String pk) {
        return paperDao.findOneByPk(pk);
    }

    @Override
    public List<Paper> findAllByPk(String pk) {
        return null;
    }

    @Override
    public Paper findPaperWithQuestions(String paperId) {
        return paperDao.findPaperWithQuestions(paperId);
    }
}
